package org.example.controller;

import org.example.api.Blog.FeignBlogService;
import org.example.entity.domain.Blog;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Aaron
 * @since 2020/12/23 13:15
 * <p>描述：</p>
 */
@RestController
@RequestMapping("/auth/blog")
public class BlogController {

    private final FeignBlogService feignBlogService;

    public BlogController(FeignBlogService feignBlogService) {
        this.feignBlogService = feignBlogService;
    }

    @GetMapping("/blog")
    public Blog findById(@RequestParam Long id) {
        return this.feignBlogService.findById(id);
    }

}
